columnview: Fix some issues with column resizing
authorMatthias Clasen <mclasen@redhat.com>
Mon, 19 Oct 2020 12:25:09 +0000 (08:25 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 19 Oct 2020 12:29:29 +0000 (08:29 -0400)
Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).

Related: #3274

gtk/gtkcolumnview.c

index d2b73fe1053703f5a7e3fe4776498645741ca5d4..f983f7c03b5617d8e17dd1bef736be3b2bf23d08 100644 (file)
@@ -862,12 +862,16 @@ gtk_column_view_in_resize_rect (GtkColumnView       *self,
 {
   GtkWidget *header;
   graphene_rect_t rect;
+  int width;
 
   header = gtk_column_view_column_get_header (column);
 
   if (!gtk_widget_compute_bounds (header, self->header, &rect))
     return FALSE;
 
+  gtk_column_view_column_get_allocation (column, NULL, &width);
+  rect.size.width = width;
+
   rect.origin.x += rect.size.width - DRAG_WIDTH / 2;
   rect.size.width = DRAG_WIDTH;